@(currentPage: com.avaje.ebean.Page[AccountingRow])

@main("List") {
    <table class="table table-bordered">
        <thead>
            <tr>
                <th>Date</th>
                <th>Label</th>
                <th>Amount</th>
                <th>Type</th>
            </tr>
        </thead>
        <tbody>
        @for(accountingRow:AccountingRow <- currentPage.getList) {
            <tr>
                <td>@if(accountingRow.date != null){@accountingRow.date.format("dd MMM yyyy")}</td>
                <td>@accountingRow.label</td>
                <td>@accountingRow.amount</td>
                <td>@if(accountingRow.category != null){@accountingRow.category.name}</td>
            </tr>
        }
        </tbody>
    </table>
}
